package com.laot.search.controller;

import com.laot.search.service.DataSourceSignService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.laot.seacher_master.model.common.BaseResponse;
import org.laot.seacher_master.model.common.ResultUtils;
import org.laot.searchManage.vo.DataSourceSignVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 数据源登记接口
 * @author laoT
 * @date 2024/1/22
 */
@RestController
@RequestMapping("/dataSourceSign")
@Api(tags = "数据源登记接口")
@Slf4j
public class DataSourceSignController {

    @Resource
    private DataSourceSignService dataSourceSignService;

    @GetMapping("/listAll")
    @ApiOperation("查询所有")
    public BaseResponse<List<DataSourceSignVo>> listAll(){
        List<DataSourceSignVo> dataSourceSignVoList =  dataSourceSignService.listAll();
        return ResultUtils.success(dataSourceSignVoList);
    }

}
